<div class="container member-container">
    <?php include $this->getViewFile('../lib/leftmenu'); ?>
    <div class="col-md-10 member-con mb-alwang-con">
        <div class="title mb-common-title"><span>我的地址<div style="margin: -26px 767px;" class="tips_hold"id="tip_6" data-content="务必真实有效的填写您的联系地址，地址将作为积分兑换商品等联系地址"></div></span></div> 

        <?php
        $form = $this->beginWidget('CActiveForm', array(
            'id' => 'address-form',
        ));
        ?>
        <?php echo $form->errorSummary($memberAddress); ?>
        <table>
            <tr>
                <td width="80" class="head"><?php echo CHtml::activeLabel($memberAddress, 'consignee'); ?>:</td>
                <td width="500"><?php echo $form->textField($memberAddress, 'consignee'); ?></td>
                <td><?php echo $form->error($memberAddress, 'consignee'); ?></td>
            </tr>

            <tr>
                <td width="80"  class="head">所在地:</td>
                <td width="500"><?php
                    echo $form->dropDownList(
                            $memberAddress, 'province', CHtml::listData(RegionModel::model()->findAll('region_type=:type', array(':type' => 1)), 'region_id', 'region_name'), array(
                        'empty' => '-请选择-',
                        'ajax' => array(
                            'url' => Yii::app()->createUrl('user/info/getregions'),
                            'data' => array('pid' => 'js:this.value', 'type' => 2),
                            'success' => 'function(html){jQuery("#MembersAddressModel_city").html(html);jQuery("#MembersAddressModel_district").html("<option value=\'0\'>-请选择-</option>")}'
                        )
                            )
                    )
                    ?>

                    <?php
                    echo $form->dropDownList(
                            $memberAddress, 'city', CHtml::listData(RegionModel::model()->findAll('region_type=:type and parent_id=:parent_id', array(':type' => 2,':parent_id'=>$memberAddress->province)), 'region_id', 'region_name'), array(
                        'empty' => '-请选择-',
                        'ajax' => array(
                            'url' => Yii::app()->createUrl('user/info/getregions'),
                            'data' => array('pid' => 'js:this.value', 'type' => 3),
                            'update' => '#MembersAddressModel_district'
                        )
                            )
                    );
                    ?>

                    <?php
                    echo $form->dropDownList(
                            $memberAddress, 'district', CHtml::listData(RegionModel::model()->findAll('region_type=:type and parent_id=:parent_id', array(':type' => 3,':parent_id'=>$memberAddress->city)), 'region_id', 'region_name'), array('empty' => '-请选择-')
                    );
                    ?></td>
                <td><?php echo $form->error($memberAddress, 'address'); ?></td>
            </tr>

            <tr>
                <td width="80"  class="head"><?php echo CHtml::activeLabel($memberAddress, 'address'); ?>：</td>
                <td width="500"><?php echo $form->textField($memberAddress, 'address'); ?></td>
                <td><?php echo $form->error($memberAddress, 'address'); ?></td>
            </tr>
            <tr>
                <td width="80"  class="head"><?php echo CHtml::activeLabel($memberAddress, 'mobile'); ?>：</td>
                <td width="500"><?php echo $form->textField($memberAddress, 'mobile'); ?></td>
                <td><?php echo $form->error($memberAddress, 'mobile'); ?></td>
            </tr>
            <tr>
                <td width="80"  class="head"><?php echo CHtml::activeLabel($memberAddress, 'zipcode'); ?>：</td>
                <td width="500"><?php echo $form->textField($memberAddress, 'zipcode'); ?></td>
                <td><?php echo $form->error($memberAddress, 'zipcode'); ?></td>
            </tr>
            <tr>
                <td width="80"  class="head"></td>
                <td width="500"><?php echo CHtml::submitButton('提交', array('class' => "login-spt btn")); ?></td>
                <td></td>
            </tr>
        </table>
        <?php $this->endWidget(); ?>
    </div>
    <div class="clearfix"></div>
</div>